package dome2;
//接口的使用

public class TestDome2 {

    public static void main(String[] args) {
     Mouse mouse = new Mouse();
     KeyBoard keyBoard = new KeyBoard();
     Computer computer = new Computer();
     computer.open();
     //使用鼠标设备
     computer.useDevice(new Mouse());
     //使用键盘设备
     computer.useDevice(new KeyBoard());
     computer.close();
    }
}
